﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace SARD
{
    public partial class Staticaloveraline : Form
    {
        Point p1, p2;
        Classes.dicomimage dcm;


        /// <summary>
        /// Constructor function of the class
        /// </summary>
        /// <param name="values">
        /// It takes a list of ushort values (the data to be processed)
        /// </param>
        /// <param name="calc">
        /// It takes the base rectangle that will be used to set the initial position and range.
        /// </param>
        /// <param name="width">
        /// It takes the width of the processed image (it is necessary to convert vector to a matrix)
        /// </param>
        public Staticaloveraline( ref Classes.dicomimage dcm, Point p1, Point p2)
        {

            InitializeComponent();
            this.dcm = dcm;
            this.p1 = p1;
            this.p2 = p2;
            this.textBox1.Text = Convert.ToString((int)(Math.Abs(p1.X - p2.X)));
            this.textBox2.Text = Convert.ToString((int)(Math.Abs(p1.Y - p2.Y)));

        }


        /// <summary>
        /// This command is responsible for updating the fields of the form.
        /// During this process the max, min, average and the stddev will be calculated.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void button1_Click(object sender, EventArgs e)
        {
            /*
            Point maxandmin = dcm.maxandmin(calc);
            textBox3.Text = Convert.ToString(maxandmin.Y);
            textBox4.Text = Convert.ToString(maxandmin.X);
            textBox5.Text = Convert.ToString(Math.Round(dcm.average(calc), 3));
            textBox6.Text = Convert.ToString(Math.Round(dcm.stddev(calc), 3));
            */
        }

    }
}
